ostree.git
12 years agobuild: Fix and prettify build option output
Colin Walters [Sat, 17 Aug 2013 19:21:31 +0000 (15:21 -0400)]
build: Fix and prettify build option output

The documentation one was broken by the gtk-doc changes, and let's
align things.

12 years agoostree init: Fix mode list help string
Sjoerd Simons [Mon, 12 Aug 2013 08:53:03 +0000 (10:53 +0200)]
ostree init: Fix mode list help string

It's archive-z2, not archive-z.

https://bugzilla.gnome.org/show_bug.cgi?id=705849

12 years agoFix make distcheck
Sjoerd Simons [Mon, 12 Aug 2013 14:27:42 +0000 (16:27 +0200)]
Fix make distcheck

make distcheck was unhappy for various reasons:
  * headers aren't data, so use _HEADERS otherwise compilation fails
  * Mark the gir & typelib data as cleanfiles so they aren't left around
    after make clean
  * Don't nuke the .la file. This breaks make uninstall, leave it up to
    distributions to not install .la files if they don't want them.

https://bugzilla.gnome.org/show_bug.cgi?id=705850

12 years agolibostree: Delete some leftover remnant API for archive files
Colin Walters [Sat, 17 Aug 2013 18:08:04 +0000 (14:08 -0400)]
libostree: Delete some leftover remnant API for archive files

12 years agolibostree: Increase gtk-doc coverage of ostree-repo.[ch]
Colin Walters [Sat, 17 Aug 2013 17:57:22 +0000 (13:57 -0400)]
libostree: Increase gtk-doc coverage of ostree-repo.[ch]

12 years agolibostree: Add gtk-doc section for ostree-repo.c
Colin Walters [Sat, 17 Aug 2013 17:22:58 +0000 (13:22 -0400)]
libostree: Add gtk-doc section for ostree-repo.c

12 years agolibostree: More gtk-doc updates for ostree-core
Colin Walters [Sat, 17 Aug 2013 14:54:00 +0000 (10:54 -0400)]
libostree: More gtk-doc updates for ostree-core

12 years agodocs: Add an overview section, migrate some content from the wiki
Colin Walters [Sat, 17 Aug 2013 13:22:08 +0000 (09:22 -0400)]
docs: Add an overview section, migrate some content from the wiki

12 years agolibostree: Fix many gtk-doc warnings
Colin Walters [Sat, 17 Aug 2013 12:41:31 +0000 (08:41 -0400)]
libostree: Fix many gtk-doc warnings

12 years agocore: Drop duplicated type declarations
Colin Walters [Sat, 17 Aug 2013 12:23:28 +0000 (08:23 -0400)]
core: Drop duplicated type declarations

3 fewer gtk-doc warnings, 99 still left on the wall...

12 years agolibostree: Document more core macros
Colin Walters [Sat, 17 Aug 2013 12:21:04 +0000 (08:21 -0400)]
libostree: Document more core macros

12 years agoFix use of uninitialized memory in ostree_builtin_checksum()
Stef Walter [Wed, 14 Aug 2013 08:20:41 +0000 (10:20 +0200)]
Fix use of uninitialized memory in ostree_builtin_checksum()

https://bugzilla.gnome.org/show_bug.cgi?id=705968

12 years agoTODO: Tweak
Colin Walters [Sat, 17 Aug 2013 03:19:30 +0000 (23:19 -0400)]
TODO: Tweak

12 years agobuild: Fix the build without documentation
Colin Walters [Sat, 17 Aug 2013 03:14:30 +0000 (23:14 -0400)]
build: Fix the build without documentation

Just key everything of gtk-doc.

12 years agocore: Remove old "archive" mode
Colin Walters [Thu, 15 Aug 2013 10:34:48 +0000 (06:34 -0400)]
core: Remove old "archive" mode

We'll always have "bare" mode for keeping files-as-hardlinks as root.
But "archive" was my second attempt at a format for non-root file
storage, used by the gnome-ostree buildsystem which runs as non-root.

It was really handy to have a "tar" like mode where I can create
tarballs as a user, that contain files owned by root for example.

The "archive" mode stored content files as two pieces in the
filesystem; ".file" contained metadata, and ".filecontent" was the
actual content, uncompressed.  The nice thing about this was that to
check out a tree as non-root, you could just hardlink into the repo.

However, archive was fairly bad for serving via HTTP; it required
*two* HTTP requests per content object, greatly magnifing the already
inefficient fetch process.  So "archive-z2" was introduced.

To allow gnome-ostree to still check out trees as a user, the
"uncompressed-object-cache" was introduced, and that's how things have
been working for a while.

So we should just be able to kill this code.  Specifically note just
how much better the stage_object() function became.

https://bugzilla.gnome.org/show_bug.cgi?id=706057

12 years agoAdd gtk-doc support
Colin Walters [Sat, 17 Aug 2013 02:54:35 +0000 (22:54 -0400)]
Add gtk-doc support

Yes, it's really me.  Colin Walters.  Writing documentation.  You
don't need to do a DNA test.

12 years agoAdd 'ostree reset' command to undo a bad commit
Stef Walter [Wed, 14 Aug 2013 10:42:13 +0000 (12:42 +0200)]
Add 'ostree reset' command to undo a bad commit

Accepts the following arguments: ref checksum

Checks that the checksum is a parent of the ref before rewriting
the ref.

https://bugzilla.gnome.org/show_bug.cgi?id=705979

12 years agoconfigure: Use AS_IF() consistently
Colin Walters [Thu, 15 Aug 2013 22:33:19 +0000 (18:33 -0400)]
configure: Use AS_IF() consistently

See https://bugzilla.gnome.org/show_bug.cgi?id=681413

12 years agoInstall systemd units in the right location
Sjoerd Simons [Mon, 12 Aug 2013 17:27:27 +0000 (19:27 +0200)]
Install systemd units in the right location

Debian uses /lib/systemd/system for system unit files, while i'm
putting ostree under the /usr prefix which means the hardcoded path
fails. Leave it to configure to work out the right location for systemd
units (method copied from pollkit).

Furthermore instead of installing the unit in local-fs.target.wants by
hand add a [Install] section so systemctl enable does the right thing

https://bugzilla.gnome.org/show_bug.cgi?id=705864

12 years agocore: Use gs_stream_fstat()
Colin Walters [Thu, 15 Aug 2013 18:21:26 +0000 (14:21 -0400)]
core: Use gs_stream_fstat()

Just a cleanup.

12 years agocore: Add some more gtk-doc
Colin Walters [Thu, 15 Aug 2013 15:17:16 +0000 (11:17 -0400)]
core: Add some more gtk-doc

12 years agocore: Add some gtk-doc
Colin Walters [Thu, 15 Aug 2013 11:04:29 +0000 (07:04 -0400)]
core: Add some gtk-doc

Just documenting a few functions to get in the habit of things.

12 years agoAdd 'ostree log' command
Stef Walter [Wed, 14 Aug 2013 09:47:30 +0000 (11:47 +0200)]
Add 'ostree log' command

Follows the parent of commits showing each in turn until it reaches
the top of the commit tree.

https://bugzilla.gnome.org/show_bug.cgi?id=705973

12 years agoAdd ostree_commit_get_parent() to get parent from variant
Stef Walter [Wed, 14 Aug 2013 09:46:50 +0000 (11:46 +0200)]
Add ostree_commit_get_parent() to get parent from variant

https://bugzilla.gnome.org/show_bug.cgi?id=705973

12 years agoIntelligible display for 'ostree show'
Stef Walter [Wed, 14 Aug 2013 09:25:32 +0000 (11:25 +0200)]
Intelligible display for 'ostree show'

Show something similar to git metadata display. Show raw variant
data when --raw is specified

https://bugzilla.gnome.org/show_bug.cgi?id=705973

12 years agorepo: Add API to load any object as a stream
Colin Walters [Wed, 14 Aug 2013 22:18:10 +0000 (18:18 -0400)]
repo: Add API to load any object as a stream

We have APIs to load metadata as variants, and files as parsed
content/info/xattrs, but for some cases such as static deltas, all we
want is to operate on all objects in their canonical representation.

https://bugzilla.gnome.org/show_bug.cgi?id=706031

12 years agolibotutil: Make use of GBytes in ot_variant_read()
Colin Walters [Wed, 14 Aug 2013 23:54:30 +0000 (19:54 -0400)]
libotutil: Make use of GBytes in ot_variant_read()

This is just cleaner; we avoid using GObject data, etc.

https://bugzilla.gnome.org/show_bug.cgi?id=706031

12 years agocore: Add API to convert checksum -> csum in place
Colin Walters [Wed, 14 Aug 2013 22:17:09 +0000 (18:17 -0400)]
core: Add API to convert checksum -> csum in place

We already have the opposite, and this will be used in some
places to avoid a malloc.

https://bugzilla.gnome.org/show_bug.cgi?id=706031

12 years agolibotutil: Add API to create an "ay" GVariant from GBytes
Colin Walters [Wed, 14 Aug 2013 22:20:02 +0000 (18:20 -0400)]
libotutil: Add API to create an "ay" GVariant from GBytes

We used to have a version of this, but since I'm trying to use
GBytes more, this became a more common operation, and it's annoying
to type out the whole G_VARIANT_TYPE ("ay") each time, and pass
TRUE for trusted.

https://bugzilla.gnome.org/show_bug.cgi?id=706031

12 years agotrivial-httpd: Add --force-range-requests option to force range requests
Jeremy Whiting [Wed, 14 Aug 2013 20:08:25 +0000 (14:08 -0600)]
trivial-httpd: Add --force-range-requests option to force range requests

This will be used to test resuming interrupted downloads for
ostree-pull.

With this option, if a whole file is asked for, only half of the file
is given.  Then the client should retry with a range request, and
we'll give them the other half.

https://bugzilla.gnome.org/show_bug.cgi?id=705925

12 years agotest-xattrs: Skip if current FS doesn't support user_xattr
Colin Walters [Wed, 14 Aug 2013 18:46:46 +0000 (20:46 +0200)]
test-xattrs: Skip if current FS doesn't support user_xattr

tmpfs doesn't =(

12 years agocore: Add a comment header about the format
Colin Walters [Wed, 14 Aug 2013 15:27:30 +0000 (17:27 +0200)]
core: Add a comment header about the format

This should probably be a design document or something, but this is
useful for now.

12 years agoDon't pass non-checksums to ostree_repo_has_object()
Stef Walter [Wed, 14 Aug 2013 08:10:08 +0000 (10:10 +0200)]
Don't pass non-checksums to ostree_repo_has_object()

The 'ostree show' command passed non-checksum arguments
to the ostree_repo_has_object() function which led to
an assertion.

https://bugzilla.gnome.org/show_bug.cgi?id=705967

12 years agotests: Add xattr test case
Colin Walters [Wed, 14 Aug 2013 13:05:09 +0000 (15:05 +0200)]
tests: Add xattr test case

Since it was broken up until now for multiple attributes =(

12 years agoFix crasher when running 'ostree cat'
Stef Walter [Wed, 14 Aug 2013 07:01:18 +0000 (09:01 +0200)]
Fix crasher when running 'ostree cat'

Cause was a buffer read overrun.

https://bugzilla.gnome.org/show_bug.cgi?id=705964

12 years agoAdd some verbose log output when xattr functions fail
Stef Walter [Tue, 13 Aug 2013 13:42:06 +0000 (15:42 +0200)]
Add some verbose log output when xattr functions fail

If any of the system xattr functions fail, clearly write out the
reason in the verbose log output.

https://bugzilla.gnome.org/show_bug.cgi?id=705893

12 years agoDon't use XATTR_REPLACE with lsetxattr()
Stef Walter [Tue, 13 Aug 2013 13:41:12 +0000 (15:41 +0200)]
Don't use XATTR_REPLACE with lsetxattr()

If we pass XATTR_REPLACE then the attribute must already exist, which
is not our intent. Passing zero creates the attribute if necessary,
or replaces it when it already exists.

https://bugzilla.gnome.org/show_bug.cgi?id=705893

12 years agoProperly separate sorted xattr names
Stef Walter [Tue, 13 Aug 2013 13:40:06 +0000 (15:40 +0200)]
Properly separate sorted xattr names

We expect to be handling a string delimited by \0 characters, as
returned by llistxattr(). So stick to that behavior here.

https://bugzilla.gnome.org/show_bug.cgi?id=705893

12 years agoAdd some verbose logging to 'ostree commit'
Stef Walter [Tue, 13 Aug 2013 13:37:59 +0000 (15:37 +0200)]
Add some verbose logging to 'ostree commit'

This is so we can see near which file we fail when 'ostree commit'
falls over.

https://bugzilla.gnome.org/show_bug.cgi?id=705905

12 years agoAdd --verbose and -v arguments to ostree for details
Stef Walter [Tue, 13 Aug 2013 12:46:38 +0000 (14:46 +0200)]
Add --verbose and -v arguments to ostree for details

Use the GLib debug mechanism to handle verbose output.

https://bugzilla.gnome.org/show_bug.cgi?id=705905

12 years agoBetter parsing for global ostree options
Stef Walter [Tue, 13 Aug 2013 12:13:04 +0000 (14:13 +0200)]
Better parsing for global ostree options

 * Specifying global options after the command for a more natural:
   # ostree commit --repo=/path/to/repo ...
 * Support asking for --help without --repo
   # ostree commit --help
 * Support short form of -h
 * Support specifying --repo without equals sign
   # ostree --repo /path/to/repo commit ...
 * Support global --help and -h
   # ostree --help
 * Ditto for ostree admin sub commands
 * Removed some leaky code

https://bugzilla.gnome.org/show_bug.cgi?id=705903

12 years agoIgnore some built files
Stef Walter [Tue, 13 Aug 2013 12:10:25 +0000 (14:10 +0200)]
Ignore some built files

https://bugzilla.gnome.org/show_bug.cgi?id=705900

12 years agoUpdate libgsystem
Colin Walters [Wed, 7 Aug 2013 08:36:52 +0000 (10:36 +0200)]
Update libgsystem

With fd leak fix.

12 years agocore: Clean up temporary file creation
Colin Walters [Tue, 6 Aug 2013 21:58:29 +0000 (23:58 +0200)]
core: Clean up temporary file creation

Use new libgsystem API, don't expose the repo's tmpdir.

12 years agocore: Finish making object path API private
Colin Walters [Wed, 31 Jul 2013 07:48:31 +0000 (03:48 -0400)]
core: Finish making object path API private

This allows us to more easily change the internals later.

12 years agocore: Reduce API surface for file access
Colin Walters [Wed, 31 Jul 2013 00:56:33 +0000 (20:56 -0400)]
core: Reduce API surface for file access

This function was only used by internals, make it private.

12 years agoTODO: Update
Colin Walters [Wed, 31 Jul 2013 00:51:43 +0000 (20:51 -0400)]
TODO: Update

12 years agoadmin: Clean up builtin prototype
Colin Walters [Mon, 29 Jul 2013 22:44:41 +0000 (18:44 -0400)]
admin: Clean up builtin prototype

Pass through GCancellable, and just use GFile *sysroot, since that's
all OtAdminBuiltinOpts was.

12 years agomain: Assume / for ls if no path given
Colin Walters [Sun, 28 Jul 2013 00:12:07 +0000 (20:12 -0400)]
main: Assume / for ls if no path given

Since it just is kind of a sane default.

12 years agocore: Fix all introspection warnings
Colin Walters [Sat, 27 Jul 2013 14:13:30 +0000 (10:13 -0400)]
core: Fix all introspection warnings

Still lots more docs to write and API to cleanup, but this is better.

12 years agoInstall a shared library
Colin Walters [Fri, 26 Jul 2013 23:25:07 +0000 (19:25 -0400)]
Install a shared library

This required a fair bit of surgery because previously ostree.h
included otutil.h, but that's supposed to be a private library.

12 years agocore: Work around libguestfs/FUSE issue with setuid binaries
Colin Walters [Fri, 26 Jul 2013 18:48:15 +0000 (14:48 -0400)]
core: Work around libguestfs/FUSE issue with setuid binaries

For some reason, the setuid bits are being stripped.  This
workaround is enough for now.

12 years agoAdd API to retrieve statistics from transactions, use it in commit
Colin Walters [Thu, 25 Jul 2013 22:52:06 +0000 (18:52 -0400)]
Add API to retrieve statistics from transactions, use it in commit

It's just interesting to see =) This is also kind of prototyping out
some more "structured" output.

12 years agolib: Use -export-symbol-regex
Colin Walters [Thu, 25 Jul 2013 21:09:00 +0000 (17:09 -0400)]
lib: Use -export-symbol-regex

Just a small step towards being a better library.

12 years agofsck: Fix crash on repositories with < 10 objects
Colin Walters [Thu, 25 Jul 2013 16:06:21 +0000 (12:06 -0400)]
fsck: Fix crash on repositories with < 10 objects

12 years agopull: Tweak status line again, do what git does
Colin Walters [Wed, 24 Jul 2013 22:20:19 +0000 (18:20 -0400)]
pull: Tweak status line again, do what git does

Almost, we don't have bytes transferred.  And we lie about percentages
since as metadata comes in the total number of objects to fetch goes
up.

12 years agomain: Fix previous commit to find repo in cwd over /ostree/repo
Colin Walters [Wed, 24 Jul 2013 18:46:53 +0000 (14:46 -0400)]
main: Fix previous commit to find repo in cwd over /ostree/repo

The tests when run inside gnome-ostree broke, and this is better
behavior.

12 years agomain: Support using repo from current directory
Colin Walters [Wed, 24 Jul 2013 18:05:12 +0000 (14:05 -0400)]
main: Support using repo from current directory

$ cd repo
$ ostree ls foo /
...

Can be a lot more convenient than typing --repo=repo a lot.

12 years agoTODO: More bits about commit objects
Colin Walters [Wed, 24 Jul 2013 17:10:28 +0000 (13:10 -0400)]
TODO: More bits about commit objects

12 years agoDrop support for related objects and metadata in commit objects
Colin Walters [Wed, 24 Jul 2013 16:59:27 +0000 (12:59 -0400)]
Drop support for related objects and metadata in commit objects

While the actual commit object format is presently the same, for a
number of reasons we'd like to change it fairly radically.  Among
other things, we need to drop our a{sv} types in objects, to protect
against GVariant changing format.

Since now gnome-ostree now longer uses related objects, and nothing
ever used metadata, just drop them both.

12 years agomain: Fix an uninitialized variable
Colin Walters [Wed, 24 Jul 2013 13:36:51 +0000 (09:36 -0400)]
main: Fix an uninitialized variable

12 years agopull: Always scan for commit object, even if ref is unchanged
Colin Walters [Tue, 23 Jul 2013 23:36:15 +0000 (19:36 -0400)]
pull: Always scan for commit object, even if ref is unchanged

If the admin encounters corruption and does:

$ ostree admin fsck --delete

We want them to be able to recover the objects easily from the
network; with this patch, they do:

$ ln -s dummyvalue /ostree/repo/transaction
$ ostree refs --delete remotename:branchname
$ ostree pull remotename

This patch avoids the need for the refs --delete; we might as well
force scan the commit, and with this patch we still print that it
changed.

12 years agomain: ls: Behave like standard Unix "ls" with directories
Colin Walters [Tue, 23 Jul 2013 22:41:03 +0000 (18:41 -0400)]
main: ls: Behave like standard Unix "ls" with directories

Default to listing directory contents, add -d/--dironly to suppress
this.

12 years agomain: Squash a compiler warning
Colin Walters [Tue, 23 Jul 2013 22:34:34 +0000 (18:34 -0400)]
main: Squash a compiler warning

12 years agomain: Consistently use "opt_" as a prefix for option local variables
Colin Walters [Tue, 23 Jul 2013 22:33:29 +0000 (18:33 -0400)]
main: Consistently use "opt_" as a prefix for option local variables

This makes it easier to find where we're using global state, which is
useful when refactoring code into libostree.

12 years agomain: commit: Drop broken --parent option
Colin Walters [Tue, 23 Jul 2013 22:24:52 +0000 (18:24 -0400)]
main: commit: Drop broken --parent option

No idea why we had this, it didn't do anything in the current code.
Noticed while doing other refactoring.

12 years agomain: Drop log builtin
Colin Walters [Tue, 23 Jul 2013 22:16:54 +0000 (18:16 -0400)]
main: Drop log builtin

We may revive this later, but commits in their current form aren't
very useful for humans to read, so it doesn't make sense to have a
tool to show a history of useless stuff.

More interesting things are diffs between commits, object statistics,
etc.

12 years agomain: pull: Reduce the status line length a bit
Colin Walters [Tue, 23 Jul 2013 21:29:46 +0000 (17:29 -0400)]
main: pull: Reduce the status line length a bit

Drop "objects" where it's obvious [ to me anyways =) ], and drop the
bytes transferred since our math was off, and the HTTP status kind of
shows that.

12 years agoTODO: Add an item about commit objets
Colin Walters [Tue, 23 Jul 2013 18:42:07 +0000 (14:42 -0400)]
TODO: Add an item about commit objets

12 years agoadmin: Add an "undeploy" command
Colin Walters [Tue, 23 Jul 2013 13:19:24 +0000 (09:19 -0400)]
admin: Add an "undeploy" command

Otherwise it's really easy to keep accumulating deployments.  Also, we
may want to run this after rebooting, so we're back down to one
operating system.

12 years agocore: Don't strip setuid bits when creating files
Colin Walters [Thu, 18 Jul 2013 18:23:55 +0000 (14:23 -0400)]
core: Don't strip setuid bits when creating files

This ugly regression occurred because I overlooked the fact that our
chown() invocation would strip off setuid.

12 years agomain: show: Don't strip mode, let's see the whole thing
Colin Walters [Thu, 18 Jul 2013 18:23:12 +0000 (14:23 -0400)]
main: show: Don't strip mode, let's see the whole thing

Just useful for debugging.

12 years agomain: Add --delete option to fsck
Colin Walters [Thu, 18 Jul 2013 16:09:44 +0000 (12:09 -0400)]
main: Add --delete option to fsck

This is useful for clearing out all corrupted objects locally.

12 years agomain: Clean up fsck code: honor --quiet, warn (but continue) on missing objects
Colin Walters [Thu, 18 Jul 2013 13:05:58 +0000 (09:05 -0400)]
main: Clean up fsck code: honor --quiet, warn (but continue) on missing objects

When we make fsck --delete work again, it will be convenient to
continue on missing objects.

12 years agoUpdate libgsystem
Colin Walters [Thu, 18 Jul 2013 03:00:03 +0000 (23:00 -0400)]
Update libgsystem

12 years agomain: Make "ostree show" actually useful for files
Colin Walters [Thu, 18 Jul 2013 01:10:04 +0000 (21:10 -0400)]
main: Make "ostree show" actually useful for files

We already have "ostree cat" for files, here we want to see a dump of
the metadata.

12 years agoTODO: Add more
Colin Walters [Thu, 18 Jul 2013 00:20:50 +0000 (20:20 -0400)]
TODO: Add more

12 years agotests: Add a test for link checkout speedup
Colin Walters [Wed, 17 Jul 2013 23:47:40 +0000 (19:47 -0400)]
tests: Add a test for link checkout speedup

12 years agodiff: Add --stats option
Colin Walters [Wed, 17 Jul 2013 23:20:22 +0000 (19:20 -0400)]
diff: Add --stats option

This a neat way to see how many objects are shared between two
commits.

12 years agomain: Add --link-checkout-speedup option to commit
Colin Walters [Wed, 17 Jul 2013 20:16:45 +0000 (16:16 -0400)]
main: Add --link-checkout-speedup option to commit

And disable devino scan by default.  For the gnome-ostree build case,
our commits are from "make install DESTDIR=", so they won't be
hardlinks into the repo.  In that case, particularly as the repository
size grows, the cost of building up the devino -> checksum mapping
becomes a problem.

The compose step will use this option though.

12 years agodoc: Fix a typo
Jiro Matsuzawa [Wed, 17 Jul 2013 03:20:31 +0000 (12:20 +0900)]
doc: Fix a typo

https://bugzilla.gnome.org/show_bug.cgi?id=704365

12 years agoRelease 2013.4
Colin Walters [Wed, 17 Jul 2013 00:41:47 +0000 (20:41 -0400)]
Release 2013.4

12 years agodoc: A long overdue manpage update
Colin Walters [Tue, 16 Jul 2013 22:40:11 +0000 (18:40 -0400)]
doc: A long overdue manpage update

Ok, just a little one, but still.  I actually updated documentation!

12 years agomain: Move GCancellable to toplevel
Colin Walters [Tue, 16 Jul 2013 22:13:39 +0000 (18:13 -0400)]
main: Move GCancellable to toplevel

This is just cleaner, and makes the builtins slightly more of a
library, which in turn makes it easier to turn them into real API.

12 years agoprune: Don't fail if a to-be-pruned object doesn't exist
Colin Walters [Tue, 16 Jul 2013 14:01:58 +0000 (10:01 -0400)]
prune: Don't fail if a to-be-pruned object doesn't exist

Previously, if a prune was interrupted, further attempts would fail.
It's just better to silently continue here.

12 years agoDrop support for fifos and devices
Colin Walters [Tue, 16 Jul 2013 13:35:44 +0000 (09:35 -0400)]
Drop support for fifos and devices

While the first was useful way back in the day when we were importing
Debian bits and /sbin/init was expecting to find /dev/.initctl as a
named pipe, that's no longer an issue with systemd since it uses
dynamic Unix sockets.

Likewise, character and block devices in /dev are now dynamically
created by the devtmpfs from the kernel.

Less complexity and code here if we just support directories, regular
files, and symbolic links.

12 years agocore: Drop a leftover unnecessary #define _GNU_SOURCE
Colin Walters [Tue, 16 Jul 2013 13:22:42 +0000 (09:22 -0400)]
core: Drop a leftover unnecessary #define _GNU_SOURCE

We now use AC_USE_SYSTEM_EXTENSIONS.

12 years agocore: Use gsystem API for generating temporary names
Colin Walters [Tue, 16 Jul 2013 12:50:31 +0000 (08:50 -0400)]
core: Use gsystem API for generating temporary names

Drops duplicated code.

12 years agocore: Use gs_file_create()
Colin Walters [Tue, 16 Jul 2013 12:49:46 +0000 (08:49 -0400)]
core: Use gs_file_create()

This allows us to drop a chmod() invocation, since the regular file
path was the only thing that didn't handle mode.

12 years agoUpdate libgsystem
Colin Walters [Tue, 16 Jul 2013 12:51:37 +0000 (08:51 -0400)]
Update libgsystem

12 years agoadmin: Rename prune -> cleanup, avoid doing repo prune twice
Colin Walters [Mon, 15 Jul 2013 20:13:12 +0000 (16:13 -0400)]
admin: Rename prune -> cleanup, avoid doing repo prune twice

Calling it "cleanup" is better since it does more than repo pruning.

We were also doing a prune twice; ot_admin_cleanup() already does one,
so drop the bits to do it in cleanup.c.

12 years agoadmin: Initialize sysroot to / by default, not garbage from the stack
Colin Walters [Thu, 11 Jul 2013 21:29:04 +0000 (17:29 -0400)]
admin: Initialize sysroot to / by default, not garbage from the stack

Oops.

12 years agoadmin status: Print out origin too
Colin Walters [Thu, 11 Jul 2013 21:07:14 +0000 (17:07 -0400)]
admin status: Print out origin too

This is useful data.

12 years agomain: Also make ostree admin foo --help work
Colin Walters [Wed, 10 Jul 2013 22:42:58 +0000 (18:42 -0400)]
main: Also make ostree admin foo --help work

A followup for the previous commit.

12 years agomain: Only parse options in subcommands
Colin Walters [Wed, 10 Jul 2013 22:23:52 +0000 (18:23 -0400)]
main: Only parse options in subcommands

This makes e.g. "ostree commit --help" work, which is really good.

12 years agomain: Don't look for /sysroot/ostree too
Colin Walters [Wed, 10 Jul 2013 22:13:55 +0000 (18:13 -0400)]
main: Don't look for /sysroot/ostree too

No longer necessary now that we expect OS/ trees to have
/ostree -> /sysroot/ostree.

12 years agoUse AC_USE_SYSTEM_EXTENSIONS instead of #define _GNU_SOURCE
Colin Walters [Wed, 10 Jul 2013 17:24:15 +0000 (13:24 -0400)]
Use AC_USE_SYSTEM_EXTENSIONS instead of #define _GNU_SOURCE

It's less copy/paste, works everywhere, etc.

Also fix some missing #include "config.h".

12 years agomain: Print "error: " prefix on errors
Colin Walters [Wed, 10 Jul 2013 17:25:15 +0000 (13:25 -0400)]
main: Print "error: " prefix on errors

It's just clearer that something went wrong.

12 years agoadmin: Add a warm fuzzy message to deploy about transactions
Colin Walters [Wed, 10 Jul 2013 06:30:26 +0000 (02:30 -0400)]
admin: Add a warm fuzzy message to deploy about transactions

Since it sounds cool and stuff.

12 years agoTODO: Misc updates
Colin Walters [Wed, 10 Jul 2013 04:00:11 +0000 (00:00 -0400)]
TODO: Misc updates